export interface Course {
  courseId: string;
  teacherName: string;
  teacherId: string;
  courseTag: string;
  courseDescription: string;
  courseSchedule: string;
  courseName: string;
  courseImage: string | null;
  folderId: string;
  viewNum: string;
  createdAt: string;
  img: string;
  cardName: string;
  description: string;
  views: string;
  path: string;
}

export interface CourseState {
  courses: Course[];
  total: number;
  currentPage: number;
  isLoaded: boolean; // 判断是否已经加载过数据
}

// 保证属性都是可选的
export interface SourceFile {
  courseFileId?: string;
  sourceId?: string;
  name: string;
  sourcePath?: string | null;
  createdAt?: string;
  courseId?: string | null;
  tag: string;
  ossWriteStatus?: boolean;
  transcriptionComplete?: boolean;
  ragCompleteStatus?: boolean;
  smartTextStatus?: boolean;
  transcriptionCompleteStatus?: boolean;
  handleCompleteStatus?: boolean;
  web?: string | null;
  sortOrder?: number | null;
}

export interface WebSource {
  webName: string;
  web: string;
}

export interface CourseFile {
  courseFileId: string;
  name: string | null;
  parentId: string | null;
  filePath: string | null;
  createdAt: string | null;
  childId: string | null;
  tag: string | null;
  level: number;
  courseId: string | null;
  sortOrder: number | null;
  courseImageUrl: string | null;
  ossWriteStatus: boolean | null;
  transcriptionComplete: boolean | null;
  ragCompleteStatus: boolean | null;
  smartTextStatus: boolean | null;
  transcriptionCompleteStatus: boolean | null;
  handleCompleteStatus: boolean | null;
  web: string | null;
  childFiles: CourseFile[];
  sourceFiles: SourceFile[];
  webSourses: WebSource[];

  sourceId?: string;
  webSources?: WebSource[];
}
